<?php

function update_last_login($username) {
    global $aldb;
    $time_now = time();
    $aldb->query("UPDATE $aldb->users SET `last_login`='$time_now' WHERE `username`='$username' LIMIT 1");
}
?>
